// ----- Grids, layout, containers and widgets styles.

// =Grids
// A .gridContainer contains several .gridRow. vertically
// Each .gridRow contains several .gridBox horizontally
// A .gridBox may contain several .widgetPanel vertically.
.gridContainer:before,
.gridContainer:after,
.gridRow:before,
.gridRow:after {
  content: ' ';
  display: table;
}

.gridContainer:after,
.gridRow:after {
  clear: both;
}

.gridRow {
  clear: both;
  padding: 0;
}

.gridBox {
  box-sizing: border-box;
  float: left;
  margin: 0;
}

// The .gridStyle** classes represent the width of each .gridBox container.
// The sum of all the .gridBox in a .gridRow line must always be equal to 12
.gridStyle12 {
  width: 100%;
}

.gridStyle11 {
  width: 91.66%;
}

.gridStyle10 {
  width: 83.33%;
}

.gridStyle9  {
  width: 75%;
}

.gridStyle8  {
  width: 66.66%;
}

.gridStyle7  {
  width: 58.33%;
}

.gridStyle6  {
  width: 50%;
}

.gridStyle5  {
  width: 41.66%;
}

.gridStyle4  {
  width: 33.33%;
}

.gridStyle3  {
  width: 25%;
}

.gridStyle2  {
  width: 16.66%;
}

.gridStyle1  {
  width: 8.33%;
}

// Align center when there is only one column
.gridBox:only-child {
  float: none;
  margin: 0 auto;
}

.gridBox h3,
.gridBox h4 {
  border-color: $shade-light-50;
  border-style: none none solid;
  border-width: 1px;
  font-size: 1.2em;
  margin: .7em 0 .5em;
  padding: .4em 0;
}

.summaryTitle,
.gridBox .summaryTitle {
  border-color: $shade-light-30;
  border-style: solid none none;
  border-width: 1px;
  color: $title;
  display: block;
  font-size: 1.2em;
  font-weight: bold;
  margin: 0 0 .6em;
  padding: .8em 0 .2em;
}

.gridBox .foldableBox {
  margin-right: 1em;
  padding: 0;
}

// Layout View and Summary Tab Styles - layout view selector list
.resultLayoutSelection {
  margin: 0;
  padding: 0;
  display: inline;
}

.resultLayoutSelection a img {
  border: 1px solid transparent;
}

.resultLayoutSelection a:hover img,
.resultLayoutSelection.selected img {
  border: 1px solid $column-background;
}

.thumbnailContainer {
  background: 0;
  height: 11em;
  margin: 0 -1em .7em;
}

.folderishThumbnail:after {
  background-color: rgba(255, 255, 255, .7);
  content: url('${basePath}/icons/folder.gif');
  display: inline-block;
  margin: .2em;
  padding: .2em .4em .1em;
}

// Display of thumbnail in Thumbnail Listing mode
.bubbleListing .thumbnailContainer {
  background-color: $shade-light-5;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 3px 3px 0 0;
}

// Display of thumbnail in Content views Listing mode
.dataOutput td .thumbnailContainer {
  background-position: top left;
  background-repeat: no-repeat;
  background-size: contain;
  height: 3rem;
  margin: 0;
  width: 4rem;
}

// =Standard Widgets
// Widgets styles, spacing between blocks in .gridBox containers
.widgetPanel,
.actionsWidgetPanel {
  display: block;
  padding: 0 2em 1.5em .1em;
}

.action_bar .widgetPanel,
.contextActions .actionsWidgetPanel,
.dataOutput .widgetPanel.actionsWidgetPanel {
  padding: 0;
}

.contextActions .actionLink.button  {
  border-left: 0;
  line-height: normal;
  margin: 0;
}

.contextActions .actionLink.button  {
  border-left: 0;
  line-height: normal;
  margin: 0;
}

.widgetPanel .widgetPanel,
.widgetPanel .actionsWidgetPanel,
.dataInput .fieldColumn .widgetPanel {
  padding: 0;
}

.widgetTable,
.containerWidgetTable {
  width: 100%;
}

// =Listing Widgets
.listWidgetPanel {
  display: block;
  margin-left: -.3em;
}

// Space between containers
.containerField {
  padding-bottom: 1.5em;
}

.compactLayout .containerField {
  padding-bottom: 0;
}

// =Specifics
.indicators {
  margin: 0 .2em .5em 0;
}

.indicators .widgetPanel div {
  display: inline;
  margin: 0 1em 0 0;
}

.indicators .widgetPanel img {
  margin: 0 0 -.17em;
}

// CompactLayout mode
// The .compactLayout class role is to display widgets and containers in
// a small column like the faceted search, where the margin and padding values
// are reviewed to provide a compacter display than a default tab layout

// Global rules
.compactLayout .widgetPanel,
.compactLayout .containerField,
.compactLayout .containerWidgetPanel,
.compactLayout .dataInput .containerLabel span {
  clear: both;
  display: block;
}

.compactLayout .labelColumn,
.compactLayout .widgetPanel .labelColumn,
.compactLayout .widgetTable .labelColumn,
.compactLayout .containerWidgetPanel .labelColumn {
  font-weight: normal;
  text-align: left;
  width: auto;
}

.compactLayout .dataTableNoBorder td,
.compactLayout .fieldColumnn.containerField,
.compactLayout .fieldColumnn.containerField .fieldColumn {
  padding: 0;
}

.compactLayout input[type="image"],
.compactLayout input[type="button"] {
  width: auto;
}

.compactLayout select {
  width: 100%;
}

.compactLayout input[type="text"].rich-calendar-input {
  font-size: .9em;
  margin: .1em .3em .5em 0;
}

.compactLayout .tinyLabel {
  color: $shade-strong-20;
  display: inline-block;
  max-width: 30px;
  padding: .4em .4em 0 0;
  text-align: right;
}

.compactLayout .fieldColumn {
  padding-left: .1em;
}

.compactLayout .fieldColumn img {
  margin: 0;
}

.compactLayout .fieldColumn a img {
  margin: 0 .5em 0 0;
  vertical-align: middle;
}

.compactLayout .widgetTable .boldLabel,
.compactLayout .widgetTable .boldColumn {
  font-weight: normal;
}

// Compact buttons
.compactLayout .button {
  margin: 0 .5em .1em 0;
}

.compactLayout .sticker {
  margin: .1em .2em .1em 0;
}

.compactLayout .sticker label {
  color: $shade-strong-100;
  float: left;
  font-size: .9em;
  max-width: 88%;
}

.compactLayout .sticker a {
  float: right;
  vertical-align: top;
}

.compactLayout .sticker a img {
  margin: 0;
  width: 95%;
}

// Compact Action bar
.compactLayout .contextActions .actionsWidgetPanel {
  margin: 0;
}

.compactLayout .actionsWidgetPanel .button,
.compactLayout .actionsWidgetPanel a.button,
.compactLayout .actionsWidgetPanel input.button {
  margin: 0 0 .2em .2em;
}

.compactLayout .searchFilterActions .widgetPanel .button,
.compactLayout .searchFilterActions .widgetPanel a.button,
.compactLayout .searchFilterActions .widgetPanel input.button,
.compactLayout .searchFilterActions .widgetPanel input[type="submit"] {
  float: right;
  margin: .5em 0 1em;
  width: 50%;
}

.compactLayout .searchFilterActions {
  padding: .5em 0;
}

// Compact Widgets
.compactLayout .widgetPanel {
  padding: 0;
}

.compactLayout .widgetHeader.foldedDisabled {
  border: 0;
  color: $font-color;
  font-size: 1em;
  font-weight: bold;
  margin: .5em 0 .3em;
  padding: 0;
  text-transform: none;
}

.compactLayout .containerLabel {
  width: 30%;
}

.compactLayout .dataInput .containerLabel span {
  color: $shade-strong-20;
  padding-top: .4em;
}

// Compact Tables
.compactLayout .dataTableNoBorder.containerWidgetTable {
  margin-bottom: .5em;
}

.compactLayout .dataInput,
.compactLayout .dataTableNoBorder {
  clear: both;
  margin-top: 0;
  width: 100%;
}

.compactLayout .dataInput td,
.compactLayout .UserSuggestionInput td,
.compactLayout .dataTableNoBorder div.UserSuggestionInput td {
  padding: 0;
}

.compactLayout .containerWidgetTable table.nowrap {
  border-spacing: 0;
}

.compactLayout .UserSuggestionInput table {
  border-spacing: 0;
  width: 100%;
}

// Compact Foldable boxes
.compactLayout .foldableBox {
  margin: .1em 0 .6em;
}

.compactLayout .containerWidgetPanel .foldedDisabled {
  padding-left: 0;
}

// InfoView Layout
.infoViewLeft {
  background-color: $shade-strong-100;
  bottom: 0;
  left: 0;
  position: fixed;
  top: 0;
}

.infoViewLeft .actionsWidgetPanel {
  padding: 0;
}

.infoViewLeft .note_content_block {
  background-color: $shade-light-0;
  border-radius: 0;
  bottom: 0;
  box-shadow: none;
  left: 0;
  margin: 0;
  overflow: scroll;
  padding: 1.4em 5em;
  position: absolute;
  right: 0;
  top: 0;
}

.infoViewDocContainer .documentPreview {
  background-color: $shade-light-0;
  padding: 0 5em;
}

.infoViewLeft .pictureContainer {
  height: 100%;
  left: 0;
  position: absolute;
  right: 0;
  text-align: center;
}

.infoViewLeft .pictureContainer:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.infoViewLeft .pictureContainer img {
  max-height: 100%;
  max-width: 100%;
  padding: 0;
  vertical-align: middle;
}

.infoViewLeft .video-js {
  bottom: 0;
  height: 100% !important;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100% !important;
}

.infoViewLeft .vjs-default-skin .vjs-big-play-button {
  left: 45%;
  top: 45%;
}

.infoViewLeft .infoViewAudioContainer {
  left: 5em;
  position: absolute;
  right: 5em;
  top: 50%;
}

.infoViewRight {
  background-color: $shade-light-10;
  bottom: 0;
  box-shadow: -1px 0 1px rgba(0, 0, 0, .1);
  position: absolute;
  right: 0;
  top: 0;
}

.infoViewRight .infoViewTitle {
  background-color: $shade-light-0;
  box-shadow: 0 2px 1px rgba(0, 0, 0, .2);
  font-size: 1.3em;
  font-weight: bold;
  padding: 1em;
  position: fixed;
  width: 100%;
  z-index: 60;
}

.infoViewRight .documentTitle {
  width: 22em;
  word-wrap: normal;
}

.infoViewLeft .containerSubWidget,
.infoViewRight .containerSubWidget {
  margin: 0;
}

.infoViewRight .infoViewInfoLayout,
.infoViewRight .widgetPanel.infoViewInfoLayout {
  background-color: $shade-light-10;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 5.5em 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 50;
}

.infoViewInfoLayout .widgetPanel.layoutWidgetPanel {
  padding: 1em 1.5em;
}

.infoViewLeft ~ .infoViewRight div.infoViewInfoLayout {
  padding-left: 0;
  padding-right: 0;
}

.infoViewRight .infoViewInfoLayout .containerWidgetPanel {
  background-color: $shade-light-0;
  margin: 0 1em 1em;
  padding: .5em 1em;
}

.infoViewRight .containerWidgetPanel .labelColumn {
  color: $shade-strong-20;
  padding: 0 .7em .5em 0;
  width: 30%;
}

.infoViewRight .containerWidgetPanel .widgetLabel {
  color: $shade-strong-20;
  padding: 0;
}

.infoViewRight .buttonsGadget,
.infoViewRight .buttonsGadget .smallButton:first-child {
  margin-left: 0;
}

.infoViewRight .containerWidgetPanel .summaryTitle .widgetLabel {
  color: $font-color;
}

.infoViewRight .quote {
  border-bottom: 1px solid $shade-light-30;
  padding: .3em .4em .7em 0;
}

.infoViewRight .infoBoxTable .labelColumn {
  padding: 0 .7em .4em 0;
}

.compactLayout .infoViewInfoLayout .widgetHeader.foldedDisabled {
  border: 0;
  color: $shade-strong-100;
  font-size: 1.2em;
  margin: 0 0 1em;
  padding: 0;
}

.compactLayout.infoViewRight .widgetLabel {
  padding: 0;
}

.infoViewInfoLayout .fieldColumnn.containerField .fieldColumn,
.infoViewInfoLayout .fieldColumnn.containerField .labelColumn {
  padding-bottom: .5em;
}

.infoViewRight .infoViewActions {
  background-color: $shade-light-0;
  bottom: 0;
  box-shadow: 0 -2px 1px rgba(0, 0, 0, .2);
  padding: 1em;
  position: fixed;
  width: 100%;
  z-index: 70;
}

.infoViewInfoLayout .dataInput .fieldColumn img {
  margin: .1em .2em -.2em 0;
}

.infoViewActions .horizontalAction {
  display: inline-block;
  padding-right: 1em;
}

.infoViewDocContainer iframe {
  background-color: $shade-light-0;
  border: 0;
  box-sizing: border-box;
}

.infoView {
  background: url('${basePath}/icons/chevron-left.png') no-repeat scroll center center / 80% auto rgba(0, 0, 0, .3);
  border-radius: $common-radius;
  height: 8em;
  left: 1.5%;
  position: fixed;
  top: 45%;
  width: 2em;
  z-index: 200;
}

.infoView.nxNext {
  background: url('${basePath}/icons/chevron-right.png') no-repeat scroll center center / 80% auto rgba(0, 0, 0, .3);
  left: 63%;
}

.infoView.nxPrevious a,
.infoView.nxNext a {
  color: transparent;
  display: inline-block;
  height: 8em;
  width: 2em;
}

.infoViewDocContainer .emptyResultBig {
  left: 0;
  position: absolute;
  right: 0;
  top: 43%;
}
